home *** CD-ROM | disk | FTP | other *** search
- .geometry "version 0.1";
- v1 = .free(-0.781122, -0.644323, .invisible, "1");
- v2 = .free(0.78933, -0.644323, .invisible, "2");
- l1 = .l.vv(v1, v2);
- v3 = .vonl(l1, 0.201094, -0.644323, .plus, "Ratio");
- v4 = .free(-0.668947, -0.113543, "B1");
- v5 = .free(-0.452804, 0.46922, "B2");
- v6 = .free(0.269494, 0.471956, "B3");
- v7 = .free(0.619699, -0.201094, "B4");
- bez = .bez.vvvv(v4, v5, v6, v7, .red);
- l2 = .l.vv(v4, v5);
- l3 = .l.vv(v5, v6);
- l4 = .l.vv(v6, v7);
- rat = .ratio.vvv(v1, v3, v2);
- v45 = .v.vvratio(v4, v5, rat);
- v56 = .v.vvratio(v5, v6, rat);
- v67 = .v.vvratio(v6, v7, rat);
- l5 = .l.vv(v45, v56);
- l6 = .l.vv(v56, v67);
- v456 = .v.vvratio(v45, v56, rat);
- v567 = .v.vvratio(v56, v67, rat);
- l7 = .l.vv(v456, v567);
- v4567 = .v.vvratio(v456, v567, rat, .yellow);
- .text("This shows how a cubic Bezier curve is defined in terms of its");
- .text("control points. The control points are B1, B2, B3, and B4, and");
- .text("all can be moved with the left mouse button. In addition, all");
- .text("the other points on the segments joining the control points, on");
- .text("the segments joining them, and so on, are in the same ratio as");
- .text("the point on the line at the bottom of the screen. Move the");
- .text("point named 'Ratio' along the line and notice that all the");
- .text("ratios change. The yellow point sweeps along the Bezier curve.");
-